<include file="Public/frame" />
<div class="content-wrap">
    <div class="hd cf">
        <div class="cw-title">
            结账
        </div>
    </div>
    <style type="text/css">
        table{
            border:1px solid #e9e9e9;
        }
        .head{
            border-bottom:1px solid #e9e9e9;
            line-height: 30px;
        }
        td{
            text-align: center;
        }
    </style>
    <script type="text/javascript">

    $(function(){
        $('#submit').click(function(){
            if ($('#get_name').val()=="") {
                alert('收货人不能为空！');
                return false;
            };
            if ($('#get_shouhuo').val()=="") {
                alert('收货地址不能为空！');
                return false;
            };
            if ($('#get_youbian').val()=="") {
                alert('邮政编码不能为空！');
                return false;
            };
            if ($('#get_phone').val()=="") {
                alert('联系电话不能为空！');
                return false;
            };

        });
      });

    function xiaojie(id,num,price){
        var xiaojie=$('#xiaojie'+id).val();
        return xiaojie=num * price;
    }

    function updateNum(id,price){
        var num=$('#num'+id).val();
        $.ajax({
            url:'{:U('User/Cart/updateCart')}',
            type:'POST',
            dataType:'json',
            data: 'num='+ num + "&id=" + id,
            success:function(data){
                if (data.status) {
                    popStatus(1, data.info, 1.5);
                    window.location.reload();
                }else{
                    popStatus(2, data.info, 1.5);
                }
            }
        });
    }
    </script>
    <div class="cart">
        <form action="{:U('User/Alipay/doalipay')}" method="post">
            <table width="100%" class="table-list">
            <thead>
                <tr class="head">
                    <th width="45%">产品名称</th>
                    <th width="10%">产品单价</th>
                    <th width="20%">产品数量</th>
                    <th width="10%">总    计</th>
                    
                </tr>
            </thead>
            <tbody>
                
                    <tr>
                        <td>{$order['ordtitle']}</td>
                        <td>{$order['ordprice']} <font color="red">￥</font></td>
                        <td>{$order['ordbuynum']}</td>
                        <td>{$order['ordfee']} <font color="red">￥</font></td>
                        
                    </tr>
                <tr>
                    <td colspan="4">
                         收货人：<input name="get_name" id="get_name" value="" class="input-text">
                    </td>               
                </tr>
                <tr>
                    <td colspan="4">
                         收货地址：<input name="get_shouhuo" id="get_shouhuo" value="" class="input-text">
                    </td>               
                </tr>
                <tr>
                    <td colspan="4">
                         邮政编码：<input name="get_youbian" id="get_youbian" value="" class="input-text">
                    </td>               
                </tr>
                <tr>
                    <td colspan="4">
                         联系电话：<input name="get_phone" id="get_phone" value="" class="input-text">
                    </td>               
                </tr>
                <tr>
                    <td colspan="4">
                         备注：<textarea name="beizhu" id="beizhu" class="input-text"></textarea>
                    </td>               
                </tr>
                <tr>
                    <td colspan="4">
                         <input name="submit" id="submit" value="付款" type="submit" class="button">
                    </td>               
                </tr>
                
                <input type="hidden" name="isnew" value="1">
                <input type="hidden" name="WIDout_trade_no" value="{$order['ordid']}">
                <input type="hidden" name="WIDsubject" value="{$order['ordtitle']}">
                <input type="hidden" name="WIDtotal_fee" value="{$order['ordfee']}">
                <input type="hidden" name="WIDbody" value="{$order['ordtitle']}">
                <input type="hidden" name="WIDshow_url" value="<wowocms:weburl />{:U('User/Order/lists')}">
                </tbody>
            </table>
        </form>
    </div>
    <div class="a5"></div>
</div>
<!--主要内容区-->

<!-- /主体 -->
<!-- 底部 -->
<include file="Public/foot" />